Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support external redis host and using 127.0.0.1 as default #196

Merged
merged 4 commits into from
Jul 3, 2024

Conversation

p4xx07
Copy link
Contributor

@p4xx07 p4xx07 commented Jul 2, 2024

I want to use my external redis because after many hours of streaming and recording oryx stops working. There are many keys written that get cleaned only after you delete the recording task.
I would like to be able to use my custom redis to support more intensive recordings

@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Jul 2, 2024
platform/utils.go Outdated Show resolved Hide resolved
platform/utils.go Outdated Show resolved Hide resolved
@winlinvip
Copy link
Member

winlinvip commented Jul 2, 2024

I believe this requirement is reasonable; thank you for submitting this Pull Request.

At the same time, I would like to discuss an issue with you: If we use an external Redis Server, should we support databases so that multiple Oryx instances can use the same Redis, isolating data through the DB parameter?

redis.NewClient(&redis.Options{Addr, Password, DB: 0})

If you think it's reasonable, then please add an environment variable REDIS_DATABASE, with the default value set to 0.

TRANS_BY_GPT4

@winlinvip winlinvip changed the title added redis address and using 127.0.0.1 as fallback Support external redis host and using 127.0.0.1 as default Jul 2, 2024
@p4xx07
Copy link
Contributor Author

p4xx07 commented Jul 2, 2024

Ok I think we can do this. Let me make the changes

@p4xx07

This comment was marked as off-topic.

@p4xx07
Copy link
Contributor Author

p4xx07 commented Jul 2, 2024

I've also attempted to run this docker with my modifications, but I noticed even if I have my own redis setup, oryx will attempt to create it's own redis server. How should we face this issue? Do you have any ideas?

@Allan-Nava
Copy link

I've also attempted to run this docker with my modifications, but I noticed even if I have my own redis setup, oryx will attempt to create it's own redis server. How should we face this issue? Do you have any ideas?

Same problem

@winlinvip
Copy link
Member

winlinvip commented Jul 2, 2024

@winlinvip let me know if we need to do more changes.

The issue I have been having is that if I record multiple streams for more than 10 hours with a docker with 4GB of ram, Oryx will start writing ts files in the wrong positions in the filesystem, so I'm guessing that redis gets filled up and oryx can't keep track of what he is supposed to do. Oryx will also stop working and won't come back up. If you have any thoughts on how to solve this it would be great. I'm hoping that outsourcing redis from the docker will fix this issue.

This issue is not related to this pull request. Please submit a separate issue with detailed information about it.

TRANS_BY_GPT4

@winlinvip
Copy link
Member

winlinvip commented Jul 2, 2024

I've also attempted to run this docker with my modifications, but I noticed even if I have my own redis setup, oryx will attempt to create it's own redis server. How should we face this issue? Do you have any ideas?

This environment variable simply determines which Redis server Oryx connects to. However, Oryx will always create its own Redis server. This should not affect the final outcome, as it consumes very minimal resources and remains unused.

TRANS_BY_GPT4

platform/utils.go Outdated Show resolved Hide resolved
@p4xx07
Copy link
Contributor Author

p4xx07 commented Jul 2, 2024

@winlinvip let me know if we need to do more changes.
The issue I have been having is that if I record multiple streams for more than 10 hours with a docker with 4GB of ram, Oryx will start writing ts files in the wrong positions in the filesystem, so I'm guessing that redis gets filled up and oryx can't keep track of what he is supposed to do. Oryx will also stop working and won't come back up. If you have any thoughts on how to solve this it would be great. I'm hoping that outsourcing redis from the docker will fix this issue.

This issue is not related to this pull request. Please submit a separate issue with detailed information about it.

TRANS_BY_GPT4

I have created a seperate issue with screenshots detailing the issue. Thanks @winlinvip

#197

@winlinvip winlinvip merged commit f5ef548 into ossrs:main Jul 3, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EnglishNative This issue is conveyed exclusively in English.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants